package cn.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 配送员信息表
 * </p>
 *
 * @author mp
 * @since 2025-06-16
 */
@Getter
@Setter
@TableName("delivery_men")
public class DeliveryMen implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("`name`")
    private String name;

    private String phone;

    @TableField("`password`")
    private String password;

    /**
     * 0-空闲 1-忙碌 2-离线
     */
    @TableField("`status`")
    private Byte status;

    private String currentLocation;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone = "GMT-8")
    private LocalDateTime createdAt;
    @TableField(exist = false)
    private Long count;
}
